package com.guigu.pd.auth.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.stereotype.Component;

/**
 * 
 * 
 * @author deyran
 * @email deyran@gmail.com
 * @date 2022-07-19 19:05:57
 */
@Data
@TableName("pd_auth_menu")
@NoArgsConstructor
@AllArgsConstructor
@Component
public class AuthMenuEntity implements Serializable {

	private static final long serialVersionUID = -8485128444049555818L;
	/**
	 * 主键
	 */
	@TableId
	private String id;
	/**
	 * 菜单名称
	 */
	@TableField("`name`")
	private String name;
	/**
	 * 功能描述
	 */
	@TableField("`describe`")
	private String describe;
	/**
	 * 是否公开菜单
就是无需分配就可以访问的。所有人可见
	 */
	private Boolean isPublic;
	/**
	 * 对应路由path
	 */
	private String path;
	/**
	 * 对应路由组件component
	 */
	private String component;
	/**
	 * 状态
	 */
	@TableLogic(value = "b'1'",delval = "b'0'")
	private Boolean isEnable;
	/**
	 * 排序
	 */
	private Integer sortValue;
	/**
	 * 菜单图标
	 */
	private String icon;
	/**
	 * 菜单分组
	 */
	@TableField("`level`")
	private String level;
	/**
	 * 父级菜单id
	 */
	private Long parentId;

	@TableField(exist = false)
	private List<AuthMenuEntity> children = new ArrayList<>();

}
